<?php
/**
 * View  LaFabbrica.org
 * 
 * @author     luigi.pastore (gigi@la-fabbrica.org)
 * @created    6-giu-2012
 * @package    LaFabbrica
 * @copyright  Copyright (c) 2011 Luigi Pastore
 */
?>
<script type="text/javascript">
    //<![CDATA[
     
    //]]>
</script>
<div id="content">
        <div id="summary" class="activities">
	<div class="head activities">
            <h2>Scheda Attivit&agrave;</h2>
	</div>
	<div class="body">
            <table cellspacing="0" class="table">
                <tbody>
                    <tr>
                        <th>Nome:</th>
                        <td>
                            <strong>
                            <?php echo $this->data['activity_title']?>
                            </strong>
                        </td>
                    </tr>
                    <tr>
                        <th>Data:</th>
                        <td>
                            
                            <?php
                                switch( true ):
                                    case $this->data['activity_end_date'] == null:
                                        echo '<strong>'. $this->data['activity_start_date_d'] ?> <?php echo $this->months[sprintf( '%01d', $this->data['activity_start_date_m'] )] ?> <?php echo $this->data['activity_start_date_y'] .'</strong>';
                                        if( $this->data['activity_start_time'] != null ):
                                            echo ' alle '. $this->data['activity_start_time'];
                                        endif;
                                        break;
                                    
                                    case $this->data['activity_end_date'] != null:
                                        echo  'Entro il <strong>'. $this->data['activity_end_date_d'] ?> <?php echo $this->months[sprintf( '%01d', $this->data['activity_end_date_m'] )] ?> <?php echo $this->data['activity_end_date_y'] .'</strong>';
                                        if( $this->data['activity_end_time'] != null ):
                                            echo ' alle <strong>'. $this->data['activity_end_time_ita'] .'</strong>';
                                        endif;
                                        break;
                                    
//                                    case $this->data['activity_start_date'] != null AND $this->data['activity_end_date'] != null:
//                                        echo 'Dal '. $this->data['activity_start_date_d'] ?> <?php echo $this->months[sprintf( '%01d', $this->data['activity_start_date_m'] )] ?> <?php echo $this->data['activity_start_date_y'];
//                                        echo ' al '. $this->data['activity_end_date_d'] ?> <?php echo $this->months[sprintf( '%01d', $this->data['activity_end_date_m'] )] ?> <?php echo $this->data['activity_end_date_y'];
//                                        break;
                                    default:
                                        break;
                                endswitch;
                            ?>
                            
                        </td>
                    </tr>
                    <tr>
                        <th>Assegnato a:</th>
                        <td>
                            <strong>
                            <?php echo $this->data['user_firstname']?> <?php echo $this->data['user_lastname']?>
                            </strong>
                        </td>
                    </tr>
                    <tr class="break">
                        <td colspan="2">&nbsp;</td>
                    </tr>                            
                    <tr>
                        <th>Note:</th>
                        <td><?php echo $this->data['activity_description']?></td>
                    </tr>
                </tbody>
            </table>
	</div>	
    </div>
    <form class="fab">
        <ul>
            <li class="section">
                <h3>Cosa vuoi fare ora?</h3>
            </li>
            <li class="addnew center">
                <a class="button" href="/admin/attivita/info">
                    <img src="/images/admin/16x16/add-new.png" />Nuova Attivit&agrave;
                </a>
                <a id="" class="button" href="/admin/attivita/info/id/<?php echo $this->data['activity_id'] ?>">
                    <img src="/images/admin/16x16/edit.png" />Modifica Attivit&agrave;
                </a>
                <a class="button" href="/admin/attivita/">
                    <img src="/images/admin/calendar.png" />Vai a Elenco Attivit&agrave;
                </a>
                <a class="button" href="/admin/attivita/agenda">
                    <img src="/images/admin/calendar.png" />Vai a Agenda
                </a>
            </li>
        </ul>
    </form>    
</div>